# Have your application.rb descend from this class instead of the 
# ApplicationController to secure your entire site.
# 
# The access checks are done in the controller_lock lib of the LockDown plugin.
#
class LockDownController < ActionController::Base
  include LockDown::Session::Configure

  before_filter :configure_lock_down 
  before_filter :check_for_permission 

  filter_parameter_logging :password, :password_confirmation
  
  protected
    def configure_lock_down
      #
      # Check for expired session and reset if necessary
      #
      session_expiry
      #
      # Set prevpage and thispage session variables
      #
      store_locations
      #
      # Store permissions to save database -- only done once per session
      #
      store_permissions
    end
end
